<?php 

require_once 'settings.php';
// $con = mysql_connect('localhost', 'root', 'super');
// if (!$con)
//   {
//   die('Could not connect: ' . mysql_error());
//   }

// mysql_select_db("db_tursib", $con);
 
$sql ="UPDATE t_stations SET latitude='$_GET[lat]' ,longitude='$_GET[long]' ,direction='$_GET[dir]' WHERE  id_station = '$_GET[id]'";
$result = mysql_query($sql);
echo $sql;
if ($result == 1) 
 echo mysql_insert_id();

mysql_close($con);
?>